package com.lzy.concertticket.controller;

import com.lzy.concertticket.aop.log.ApiLog;
import com.lzy.concertticket.model.R;
import com.lzy.concertticket.model.req.FlowReq;
import com.lzy.concertticket.model.vo.FlowVo;
import com.lzy.concertticket.service.FlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping("/flow")
public class FlowController {

    @Autowired
    private FlowService flowService;

    @ApiLog(title = "流量统计")
    @RequestMapping("/count")
    public R count(FlowReq flowReq) {
        List<FlowVo> flowVoList = flowService.count(flowReq);
        return R.success(flowVoList);
    }

    //  流量导出
    @ApiLog(title = "流量导出")
    @RequestMapping("/export")
    public void export() {
        flowService.export();
    }


}
